package com.kly.order.mapper;

import com.kly.dto.Benefit;
import com.kly.dto.ProductConfig;
import com.kly.dto.ProductDto;
import com.kly.order.db.entity.ProductBenefitsEntity;
import com.kly.order.db.entity.ProductEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(componentModel = "spring")
public interface ProductMapper {

    ProductDto toDto(ProductEntity product);

    @Mapping(source = "limitQuantity", target = "maxSize")
    @Mapping(source = "daysToProvide", target = "days")
    Benefit toBenefit(ProductBenefitsEntity productBenefits);
}
